

#include<DoubleLinkList.hpp>

template <typename T>
class LinkQueue
{
private:
    DoubleLinkList<T> list;
public:

    void Push(const T&element)
    {
        list.InsertTail(element);
    }

    void Pop()
    {
        if(list.Size() == 0)
            return;
        else
            list.RemoveByIndex(0);
    }

    T * GetFront()
    {
        if(list.Size() == 0)
            return nullptr;
        else
            return list.Head();
    }


    bool IsEmpty()
    {
        return list.Size() == 0;
    }

    int Size()
    {
        return list.Size();
    }
};


